﻿using FoodModel;
using J.FoodManageGet.Application.Command.TasteCommand;
using J.FoodManageGet.Application.Command.VegetablesCommand;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace J.FoodManageGet.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class VegetablesController : ControllerBase
    {
        private readonly IMediator _mediator;

        public VegetablesController(IMediator mediator)
        {
            _mediator = mediator;
        }
        /// <summary>
        /// 份量下拉框
        /// </summary>
        [HttpPost]
        public async Task<List<Vegetables>> NumBack(VegetablesShowCommand command)
        {
            return await _mediator.Send(command);
        }
    }
}
